package com.xoa.dao.flowhook;

import java.util.List;

import com.xoa.model.workflow.FlowHook;
import com.xoa.model.workflow.FlowHookWithBLOBs;
import org.apache.ibatis.annotations.Param;

public interface FlowHookMapper {
    
    int insertSelective(FlowHookWithBLOBs record);

	int deleteByhid(FlowHookWithBLOBs flowHook);

	int updateByhidSelective(FlowHookWithBLOBs flowHook);

	FlowHookWithBLOBs selectByhid(FlowHookWithBLOBs flowHook);

	List<FlowHookWithBLOBs> gethookAll(FlowHookWithBLOBs flowHook);

	/**
	 * 作者：张航宁
	 * 日期：2017-07-17
	 * */
	FlowHookWithBLOBs selectByOrderId(FlowHookWithBLOBs flowHook);

	/**
	 * @作者：张航宁
	 * @时间：2017/7/19
	 * @介绍：根据名称查询
	 * @参数：FlowHookWithBLOBs
	 */
	FlowHookWithBLOBs selectByName(FlowHookWithBLOBs flowHook);

	FlowHookWithBLOBs  queryByHmodule(@Param("hmodule") String hmodule,@Param("flowId") String flowId);

	//userId 用户ID ，startTime 开始时间 ， endTime 结束时间 , hmodule 类型
	int quarter(
			@Param("userId") String userId,
			@Param("quarterStartTime")String quarterStartTime,
			@Param("quarterEndTime")String quarterEndTime,
			@Param("hmodule")String hmodule
	);

	//userId 用户ID ，startTime 开始时间 ， endTime 结束时间 , flowId 设计流程ID
	int quarterFlowId(
			@Param("userId") String userId,
			@Param("quarterStartTime")String quarterStartTime,
			@Param("quarterEndTime")String quarterEndTime,
			@Param("flowId")String flowId
	);
}